#include "game_curl.h"
#include "game_log.h"
#include "game_util.h"


int main(){
  g_CGameCurl.init();

  // FILE *fp;
  // if ((fp = fopen("/home/gduser/curl.txt", "w")) == NULL)
  //   return false;

  // g_CGameCurl.get("http://baidu.com",fp);
  // C_LOG("curl get file %s","/home/gduser/curl.txt");
  // fclose(fp);


  // char str[10240] = {0};
  CGameCurl::RecvBuffer_t buff;// = new CGameCurl::RecvBuffer_t();
  g_CGameCurl.get("https://www.163.com/",&buff);
  // buff->push_back(0);

  std::string str;
  str.assign(buff.begin(),buff.end());

  C_LOG("curl get content(%d): (%d)%s",buff.size(),str.size(),str.c_str());

}
